package com.azxcrm.project.system.order.domain;

import java.io.Serializable;
import java.math.BigDecimal;

import com.azxcrm.framework.web.page.PageDomain;
import com.azxcrm.project.monitor.workflow.domain.WorkFlowApply;
import com.azxcrm.project.system.basic.domain.OrderDispatch;
import com.azxcrm.project.system.customer.domain.CustomerClue;
import com.azxcrm.project.system.product.domain.ProductInfo;
import com.azxcrm.project.system.user.domain.User;

/**
 * sys_order 订单
 * 
 * @author Dustyone
 * @date 2018-09-11
 */
public class Order extends PageDomain implements Serializable 
{
	private static final long serialVersionUID = 1L;
	
	/** 订单id */
	private Integer orderId;
	/** 订单号 */
	private String orderNum;
	/** 订单类型：0线上，1线下 */
	private Integer orderType;
	/** '订单状态：0待分配，1部门待跟进，2业务员待跟进，3待审核，4审核被拒，5已成单，6已退款，7流单' */
	private Integer orderStatus;
	/** 产品类型id(订单类型) */
	private Integer typeId;
	/** 产品名称 */
	private String typeName;
	/** 审批类型 ：0未知，1成单审核，2退单审核*/
	private Integer auditType;
	/** 产品id */
	private Integer productId;
	/** 全称名 */
	private String fullName;
	/** 线索id：0财务成单 */
	private Integer clueId;
	/** 客服id：0财务成单 */
	private Integer serviceUserId;
	/** 客服名 */
	private String serviceUserName;
	/** 流单时间 */
	private String finalTime;
	/** 流单原因 */
	private String finalReason;
	/** 审批状态：0未审核，1审核中，2审核通过，3审核被拒 */
	private Integer auditStatus;
	/** 财务id */
	private Integer treasurerUserId;
	/** 财务员名 */
	private String treasurerUserName;
	/** 业务员id */
	private Integer salesUserId;
	/** 业务员名 */
	private String salesUserName;
	/** 创建者 */
	private String createBy;
	/** 订单创建时间 */
	private String createTime;
	/** 订单修改时间 */
	private String updateTime;
	/** 客户线索信息 */
	private CustomerClue customerClue;
	/** 产品信息 */
	private ProductInfo productInfo;
	/** 订单派单部门 */
	private String deptName;
	/**	统计订单数 */
	private Integer countOrderId;
	/** 统计总订单价格 */
	private BigDecimal sumProductPrice;
	/** 用户信息 */
	private User user;
	/** 成单信息 */
	private OrderDeal orderDeal;
	/** 订单归属部门id 0：未知 */
	private Integer deptId;
	/** 订单审批信息 */
	private WorkFlowApply workFlowApply;
	/** 拜访记录信息 */
	private OrderVisitRecord orderVisitRecord;
	/** 拍单记录信息 */
	private OrderDispatch orderDispatch;
	/** 退单原因 */
	private String refundReason;
	/**TASK ID*/
	private String taskId;
	/**orderIds*/
	private Integer [] orderIds;
	/** 用于比较状态 */
	private Integer status;
	/**状态统计**/
	private Integer statusCount;
	/**
	 * 设置：订单id
	 */
	public void setOrderId(Integer orderId) 
	{
		this.orderId = orderId;
	}
	
	/**
	 * 获取：订单id
	 */
	public Integer getOrderId() 
	{
		return orderId;
	}
	
	/**
	 * 设置：订单号
	 */
	public void setOrderNum(String orderNum) 
	{
		this.orderNum = orderNum;
	}
	
	/**
	 * 获取：订单号
	 */
	public String getOrderNum() 
	{
		return orderNum;
	}
	
	/**
	 * 设置：订单类型：0线上，1线下
	 */
	public void setOrderType(Integer orderType) 
	{
		this.orderType = orderType;
	}
	
	/**
	 * 获取：订单类型：0线上，1线下
	 */
	public Integer getOrderType() 
	{
		return orderType;
	}
	
	/**
	 * '订单状态：0待分配，1部门待跟进，2业务员待跟进，3待审核，4审核被拒，5已成单，6已退款，7流单'
	 */
	public void setOrderStatus(Integer orderStatus) 
	{
		this.orderStatus = orderStatus;
	}
	
	/**
	 * 获取：订单状态：0待分配，1待跟进，2待审核，3审核被拒，4已成单，5已退款，6流单
	 */
	public Integer getOrderStatus() 
	{
		return orderStatus;
	}
	
	/**
	 * 设置：产品类型id(订单类型)
	 */
	public void setTypeId(Integer typeId) 
	{
		this.typeId = typeId;
	}
	
	/**
	 * 获取：产品类型id(订单类型)
	 */
	public Integer getTypeId() 
	{
		return typeId;
	}
	
	/**
	 * 设置：产品名称
	 */
	public void setTypeName(String typeName) 
	{
		this.typeName = typeName;
	}
	
	/**
	 * 获取：产品名称
	 */
	public String getTypeName() 
	{
		return typeName;
	}
	
	/**
	 * 设置：产品id
	 */
	public void setProductId(Integer productId) 
	{
		this.productId = productId;
	}
	
	/**
	 * 获取：产品id
	 */
	public Integer getProductId() 
	{
		return productId;
	}
	
	/**
	 * 设置：全称名
	 */
	public void setFullName(String fullName) 
	{
		this.fullName = fullName;
	}
	
	/**
	 * 获取：全称名
	 */
	public String getFullName() 
	{
		return fullName;
	}
	
	/**
	 * 设置：线索id：0财务成单
	 */
	public void setClueId(Integer clueId) 
	{
		this.clueId = clueId;
	}
	
	/**
	 * 获取：线索id：0财务成单
	 */
	public Integer getClueId() 
	{
		return clueId;
	}
	
	/**
	 * 设置：客服id：0财务成单
	 */
	public void setServiceUserId(Integer serviceUserId) 
	{
		this.serviceUserId = serviceUserId;
	}
	
	/**
	 * 获取：客服id：0财务成单
	 */
	public Integer getServiceUserId() 
	{
		return serviceUserId;
	}
	
	/**
	 * 设置：客服名
	 */
	public void setServiceUserName(String serviceUserName) 
	{
		this.serviceUserName = serviceUserName;
	}
	
	/**
	 * 获取：客服名
	 */
	public String getServiceUserName() 
	{
		return serviceUserName;
	}
	
	/**
	 * 设置：流单时间
	 */
	public void setFinalTime(String finalTime) 
	{
		this.finalTime = finalTime;
	}
	
	/**
	 * 获取：流单时间
	 */
	public String getFinalTime() 
	{
		return finalTime;
	}
	
	/**
	 * 设置：流单原因
	 */
	public void setFinalReason(String finalReason) 
	{
		this.finalReason = finalReason;
	}
	
	/**
	 * 获取：流单原因
	 */
	public String getFinalReason() 
	{
		return finalReason;
	}
	
	/**
	 * 设置：审批状态：0未审核，1审核中，2审核通过，3审核被拒
	 */
	public void setAuditStatus(Integer auditStatus) 
	{
		this.auditStatus = auditStatus;
	}
	
	/**
	 * 获取：审批状态：0未审核，1审核中，2审核通过，3审核被拒
	 */
	public Integer getAuditStatus() 
	{
		return auditStatus;
	}
	
	/**
	 * 设置：财务id
	 */
	public void setTreasurerUserId(Integer treasurerUserId) 
	{
		this.treasurerUserId = treasurerUserId;
	}
	
	/**
	 * 获取：财务id
	 */
	public Integer getTreasurerUserId() 
	{
		return treasurerUserId;
	}
	
	/**
	 * 设置：财务员名
	 */
	public void setTreasurerUserName(String treasurerUserName) 
	{
		this.treasurerUserName = treasurerUserName;
	}
	
	/**
	 * 获取：财务员名
	 */
	public String getTreasurerUserName() 
	{
		return treasurerUserName;
	}
	
	/**
	 * 设置：业务员id
	 */
	public void setSalesUserId(Integer salesUserId) 
	{
		this.salesUserId = salesUserId;
	}
	
	/**
	 * 获取：业务员id
	 */
	public Integer getSalesUserId() 
	{
		return salesUserId;
	}
	
	/**
	 * 设置：业务员名
	 */
	public void setSalesUserName(String salesUserName) 
	{
		this.salesUserName = salesUserName;
	}
	
	/**
	 * 获取：业务员名
	 */
	public String getSalesUserName() 
	{
		return salesUserName;
	}
	
	/**
	 * 设置：创建者
	 */
	public void setCreateBy(String createBy) 
	{
		this.createBy = createBy;
	}
	
	/**
	 * 获取：创建者
	 */
	public String getCreateBy() 
	{
		return createBy;
	}
	
	/**
	 * 设置：订单创建时间
	 */
	public void setCreateTime(String createTime) 
	{
		this.createTime = createTime;
	}
	
	/**
	 * 获取：订单创建时间
	 */
	public String getCreateTime() 
	{
		return createTime;
	}
	
	
	public String getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	/**
	 * 设置：审批类型
	 */
	public void setAuditType(Integer auditType) {
		this.auditType = auditType;
	}
	
	/**
	 * 获取：审批类型
	 * @return
	 */
	public Integer getAuditType() {
		return auditType;
	}

	public CustomerClue getCustomerClue() {
		return customerClue;
	}

	public void setCustomerClue(CustomerClue customerClue) {
		this.customerClue = customerClue;
	}

	public ProductInfo getProductInfo() {
		return productInfo;
	}

	public void setProductInfo(ProductInfo productInfo) {
		this.productInfo = productInfo;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public OrderDeal getOrderDeal() {
		return orderDeal;
	}

	public void setOrderDeal(OrderDeal orderDeal) {
		this.orderDeal = orderDeal;
	}
	
	/**
	 * 设置：订单归属部门id
	 */
	public void setDeptId(Integer deptId) {
		this.deptId = deptId;
	}

	/**
	 * 获取：订单归属部门id
	 */
	public Integer getDeptId() {
		return deptId;
	}

	public WorkFlowApply getWorkFlowApply() {
		return workFlowApply;
	}

	public void setWorkFlowApply(WorkFlowApply workFlowApply) {
		this.workFlowApply = workFlowApply;
	}

	public OrderVisitRecord getOrderVisitRecord() {
		return orderVisitRecord;
	}

	public void setOrderVisitRecord(OrderVisitRecord orderVisitRecord) {
		this.orderVisitRecord = orderVisitRecord;
	}

	public OrderDispatch getOrderDispatch() {
		return orderDispatch;
	}

	public void setOrderDispatch(OrderDispatch orderDispatch) {
		this.orderDispatch = orderDispatch;
	}
	
	public Integer getCountOrderId() {
		return countOrderId;
	}

	public void setCountOrderId(Integer countOrderId) {
		this.countOrderId = countOrderId;
	}

	public BigDecimal getSumProductPrice() {
		return sumProductPrice;
	}

	public void setSumProductPrice(BigDecimal sumProductPrice) {
		this.sumProductPrice = sumProductPrice;
	}

	public String getRefundReason() {
		return refundReason;
	}

	public void setRefundReason(String refundReason) {
		this.refundReason = refundReason;
	}

	
	
	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}
	
	public Integer[] getOrderIds() {
		return orderIds;
	}

	public void setOrderIds(Integer[] orderIds) {
		this.orderIds = orderIds;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Order(){
		
	}
	
	public Integer getStatusCount() {
		return statusCount;
	}

	public void setStatusCount(Integer statusCount) {
		this.statusCount = statusCount;
	}

	public Order(Integer auditType, Integer auditStatus, Integer orderStatus, Integer treasurerUserId, String treasurerUserName,
				String createBy, Integer typeId, String typeName, Integer productId, String fullName,
				Integer salesUserId, String salesUserName, Integer orderType){
		super();
		this.auditType = auditType;
		this.auditStatus = auditStatus;
		this.orderStatus = orderStatus;
		this.treasurerUserId = treasurerUserId;
		this.treasurerUserName = treasurerUserName;
		this.createBy = createBy;
		this.typeId = typeId;
		this.typeName = typeName;
		this.productId = productId;
		this.fullName = fullName;
		this.salesUserName = salesUserName;
		this.salesUserId = salesUserId;
		this.orderType = orderType;
	}
	
	public Order(Integer orderId, Integer auditType, Integer orderStatus){
	super();
	this.orderId = orderId;
	this.auditType = auditType;
	this.orderStatus = orderStatus;
	}

	/**
	 * 成单审批构造器
	 * @param orderId
	 * @param orderStatus
	 * @param auditType
	 * @param auditStatus
	 */
	public Order(Integer orderId, Integer orderStatus, Integer auditType, Integer auditStatus) {
		super();
		this.orderId = orderId;
		this.orderStatus = orderStatus;
		this.auditType = auditType;
		this.auditStatus = auditStatus;
	}
	
	/**
	 * 财务审核构造器
	 * @param orderId
	 * @param orderStatus
	 * @param auditType
	 * @param auditStatus
	 * @param treasurerUserId
	 * @param treasurerUserName
	 */
	public Order(Integer orderId, Integer orderStatus, Integer auditType, Integer auditStatus,Integer treasurerUserId,String treasurerUserName) {
		super();
		this.orderId = orderId;
		this.orderStatus = orderStatus;
		this.auditType = auditType;
		this.auditStatus = auditStatus;
		this.treasurerUserId = treasurerUserId;
		this.treasurerUserName = treasurerUserName;
	}
	
	
	/**
	 * 退单审批构造器
	 * @param orderId
	 * @param orderStatus
	 * @param auditType
	 * @param auditStatus
	 */
	public Order(Integer orderId, Integer orderStatus, Integer auditType, Integer auditStatus, String refundReason) {
		super();
		this.orderId = orderId;
		this.orderStatus = orderStatus;
		this.auditType = auditType;
		this.auditStatus = auditStatus;
		this.refundReason = refundReason;
	}
}
